/**
 * Copyright &copy; 2012-2016 <a href="https://git.oschina.net/zdw2016/webbase5">Webbase</a> All rights reserved.
 */
package com.foreveross.webbase.bookdemo.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;

import com.foreveross.webbase.common.persistence.DataEntity;

/**
 * 图书管理Entity
 * @author yangwanli
 * @version 2017-03-08
 */
public class SysBook extends DataEntity<SysBook> {
	
	private static final long serialVersionUID = 1L;
	private String bookname;		// 书名
	private Date createTime;		// 出版日期
	private String bookpicture;		// 图片
	private String bookpage;		// 页码
	private String author;		// 作者
	private String money;		// 单价
	private String press;		// 出版社
	private String ext;		// ext
	private String path;		// path
	
	public SysBook() {
		super();
	}

	public SysBook(String id){
		super(id);
	}

	@Length(min=1, max=255, message="书名长度必须介于 1 和 255 之间")
	public String getBookname() {
		return bookname;
	}

	public void setBookname(String bookname) {
		this.bookname = bookname;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="出版日期不能为空")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	@Length(min=1, max=255, message="图片长度必须介于 1 和 255 之间")
	public String getBookpicture() {
		return bookpicture;
	}

	public void setBookpicture(String bookpicture) {
		this.bookpicture = bookpicture;
	}
	
	@Length(min=1, max=11, message="页码长度必须介于 1 和 11 之间")
	public String getBookpage() {
		return bookpage;
	}

	public void setBookpage(String bookpage) {
		this.bookpage = bookpage;
	}
	
	@Length(min=1, max=255, message="作者长度必须介于 1 和 255 之间")
	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}
	
	@Length(min=1, max=11, message="单价长度必须介于 1 和 11 之间")
	public String getMoney() {
		return money;
	}

	public void setMoney(String money) {
		this.money = money;
	}
	
	@Length(min=1, max=255, message="出版社长度必须介于 1 和 255 之间")
	public String getPress() {
		return press;
	}

	public void setPress(String press) {
		this.press = press;
	}
	
	@Length(min=1, max=255, message="ext长度必须介于 1 和 255 之间")
	public String getExt() {
		return ext;
	}

	public void setExt(String ext) {
		this.ext = ext;
	}
	
	@Length(min=1, max=255, message="path长度必须介于 1 和 255 之间")
	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}
	
}